package cn.outsourcing.supermarket.controller;

import cn.outsourcing.supermarket.common.Result;
import cn.outsourcing.supermarket.common.utils.ResultUtils;
import cn.outsourcing.supermarket.service.WxHomeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 微信小程序主页控制器
 *
 * @author gzkemays
 * @since 2021/10/22 1:09
 */
@RestController
@RequestMapping("/index")
public class WxHomeController {
  @Resource private WxHomeService wxHomeService;

  @GetMapping("/appInfo")
  public Result getAppInfo() {
    return ResultUtils.simpleResult(wxHomeService.getHomeInfo());
  }
}
